<%--
  Created by IntelliJ IDEA.
  User: 86185
  Date: 2020/10/21
  Time: 9:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--    <span style="color: red;"><%=request.getAttribute("msg")%></span>--%>
    <span id="span_error" style="color: red;display: none;"></span>
    <form action="login" method="post">
        <input type="text" name="account" placeholder="请输入账号"></br>
        <input type="password" name="password" placeholder="请输入密码"></br>
        <input type="radio" name="type" value="0">系统管理员
        <input type="radio" name="type" value="1">宿舍管理员
        <input type="radio" name="type" value="2">学生
        <input type="checkbox" name="rem">记住我
        <button>登录</button>
        <button type="reset">重置</button>
    </form>
    <script src="js/jquery-3.5.1.js" type="application/javascript"></script>
    <script>
        $(function () {
          console.log("jquery加载成功");
          let msg = '<%=request.getParameter("error")%>';
          if(msg === '501') {
            $("#span_error").text("账号或密码错误");
            $("#span_error").show();
          }
        });
    </script>
</body>
</html>
